
import './style.css'
import App from './App.vue'
import router from '@/router/index.js'
import * as allfn from '@/utils/index.js'

Object.keys(allfn).forEach(key => {
  window[key] = allfn[key]
})

import apis from '@/api/index.js'
window.apis = apis

const app = Vue.createApp(App);

const pinia = Pinia.createPinia();
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
pinia.use(piniaPluginPersistedstate)
app.use(pinia);
app.use(router);

import MyComponent from '@/components/MyComponent.vue'
console.log('注册 MyComponent:', MyComponent)
app.component('MyComponent', MyComponent)
app.mount('#app');

window.getAppInstance = () => app
